package cn.wolfcode.luowowo.controller;

import cn.wolfcode.luowowo.domain.UserInfo;
import cn.wolfcode.luowowo.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private IUserInfoService userInfoService;

    @GetMapping("/get")
    public Object get(String id){
        return userInfoService.get(id);
    }

    @GetMapping("/checkPhone")
    public Object checkPhone(String phone){
        boolean ret = userInfoService.checkPhone(phone);
        return !ret;
    }
}
